import request from '@/utils/request'

export function appPageModelList(query) {
    return request({
      url: '/app/appPageModel/list',
      method: 'get',
      params: query
    })
  }
  export function appPageModelDelete(id) {
    return request({
      url:`/app/appPageModel/${id}`,
      method: 'delete',
    })
  }

  export function getQuerySql(query) {
    return request({
      url: '/online/page/getQuerySql',
      method: 'get',
      params: query
    })
  }

  export function appPageModelSave(data) {
    return request({
      url: '/online/page/save',
      method: 'post',
      data: data
    })
  }
  
  export function appPageModelDetail(query) {
    return request({
      url: '/online/page/get',
      method: 'get',
      params: query
    })
  }
  export function resultFields(data) {
    return request({
      url: '/online/page/resultFields',
      method: 'post',
      data: data
    })
  }
  export function checkInAndOut(id,status) {
    return request({
      url: `/app/appPageModel/${status === '0' ? 'checkout' : 'checkin'}/${id}`,
      method: 'get',
    })
  }
  export function openInClose(id,status) {
    return request({
      url: `/app/appPageModel/${status === '0' ? 'active' : 'suspended'}/${id}`,
      method: 'get',
    })
  }